<?php
class Order extends AppModel {
    public $belongsTo = array(
        'User' => array(
            'className' => 'User',
            'foreignKey' => 'userid',
            //'fields'=>array('id','login')
        )
    );
    public $validate = array(
        'mount' => array(
            'required' => array(
                'rule' => array('notEmpty'),
                'message' => 'A mount is required',
                'minLength' => 2
            )
        ),
        'tarif' => array(
            'required' => array(
                'rule' => array('notEmpty'),
                'message' => 'A tarif is required',
                'minLength' => 2
            )
        ),
        'autodjspace' => array(
            'required' => array(
                'rule' => array('notEmpty'),
                'message' => 'A autodjspace is required',
            )
        ),
        'servertype' => array(
            'required' => array(
                'rule' => array('notEmpty'),
                'message' => 'A autodjspace is required',
                'minLength' => 2
            )
        ),
        'apassword' => array(
            'required' => array(
                'rule' => array('notEmpty'),
                'message' => 'A password is required',
                'minLength' => 2
            )
        ),
        'stationname' => array(
            'required' => array(
                'rule' => array('notEmpty'),
                'message' => 'A stationname is required',
                'minLength' => 2
            )
        ),
    );
}
?>